package com.corecloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corecloud.entity.SysAreaEntity;
import com.corecloud.mapper.mysql.SysAreaMapper;
import com.corecloud.service.SysAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("sysAreaService")
public class SysAreaServiceImpl implements SysAreaService {

    @Autowired
    private SysAreaMapper sysAreaMapper;


    @Override
    public SysAreaEntity selectOne(QueryWrapper<SysAreaEntity> paras) {
        return sysAreaMapper.selectOne(paras);
    }

    @Override
    public List<SysAreaEntity> selectList(QueryWrapper<SysAreaEntity> paras) {
        return sysAreaMapper.selectList(paras);
    }

    @Override
    public List<Map<String, Object>> selectMap(QueryWrapper<SysAreaEntity> paras) {
        return sysAreaMapper.selectMaps(paras);
    }

    @Override
    public Page<SysAreaEntity> getInfoByPage(Page page, QueryWrapper<SysAreaEntity> qw) {
        return sysAreaMapper.selectPage(page,qw);
    }

    @Override
    public void updateInfo(SysAreaEntity info) {
        sysAreaMapper.updateById(info);
    }

    @Override
    public void deleteInfo(QueryWrapper<SysAreaEntity> qw) {
        sysAreaMapper.delete(qw);
    }

    @Override
    public Integer insertInfo(SysAreaEntity info) {
        return sysAreaMapper.insert(info);
    }
}